<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="待办任务" name="first">
        <onlineTodo v-if="activeName == 'first'"></onlineTodo>
      </el-tab-pane >
      <el-tab-pane label="已办任务" name="second">
        <onlineFinished v-if="activeName == 'second'"></onlineFinished>
      </el-tab-pane>
      <el-tab-pane  v-if="checkPermi(['workflow:online:manage'])" label="应用系统上线运行申请管理" name="third">
        <onlineGather v-if="activeName == 'third'"></onlineGather>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import onlineFinished from './components/onlineFinished.vue';
import onlineGather from './components/onlineGather.vue';
import onlineTodo from './components/onlineTodo.vue';


export default {
  name:'Online',
  components: {
    onlineFinished,
    onlineGather,
    onlineTodo
  },
  data() {
    return {
      activeName: 'first'
    };
  },
  mounted() {
  // 获取按钮元素数组中第一个.click()
  },
  methods: {
    
    handleClick(tab, event) {
      this.activeName = tab.name
    }
  }
};
</script>
